package action;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import dao.Campus_constructionDao;

import bean.Campus_construction;

public class Campus_constructionServlet extends HttpServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}

	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		String page = req.getParameter("page");

		ArrayList<Campus_construction> campus_construction_list = new Campus_constructionDao()
				.getAllCampus_construction();
		HttpSession session = req.getSession();
		
		session.setAttribute("campus_construction_list", campus_construction_list);
		
		resp.sendRedirect(page);
		
	}

}
